<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of FormListView
 *
 * @author mateusz.ledzewicz
 */
class DataScreen extends IndexView {
    //put your code here
    protected function chooseView($name){

        $type = (isSet($_GET[ConfigInput::actionGet])) ? $_GET[ConfigInput::actionGet] : null;
        switch($type){
            case ConfigInput::actionList:
                $this->loadContent('dataList.html');
                $this->listLoad();
            break;
            case ConfigInput::actionEdit:
                $this->loadContent('dataForm.html');
                $this->formLoad();
            break;
            case ConfigInput::actionDel:
                $this->loadContent($name.'Del.html');
                $this->delLoad();
            break;
            default:
                $this->loadContent($name.'List.html');
                $this->listLoad();
            break; 
        }
        $this->addScript('<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script> 
    <link rel="stylesheet" href="resource/css/bootstrap-datapicker.css">
    <script>
            $(function() {
              $(document).ready(function() {
                $( ".datepicker" ).datepicker({
                  dateFormat: "yy-mm-dd"
                });
                });   
            });
    </script>')
;    }
    
    protected  function listLoad() {}
    protected  function formLoad() {}
    protected  function delLoad() {}
}

?>
